import request from '@/utils/request'


//查询社区下拉树形结构
export function treeselect() {
  return request({
    url:'/address/userAddress/treeselect',
    method:'get'
  })
}


//模糊查询
export function getAddressIndex(completeAddress) {
  return request({
    url:'/address/userAddress/s/'+completeAddress,
    method:'get',
  })
}

//全部
export function selectAll() {
  return request({
    url:'/address/userAddress/selectAll',
    method:'get',
  })
}

//修改
export function updataList(dataList) {
  return request({
    url:'/address/userAddress/u/updataList',
    method:'post',
    data:JSON.stringify(dataList)
  })
}
//删除
export  function deletefrom(ybssId) {
  return request({
    url:'/address/userAddress/'+ybssId,
    method:'delete'
  })
}

//查询下拉框
export  function selectBybelongingCommunity() {
  return request({
    url:'/address/userAddress/a/selectBybelongingCommunity',
    method:'get'
  })
}
//新增
export function insertdatalist(dataList) {
  return request({
    url:'/address/userAddress/insertdatalist',
    method:'post',
    data:JSON.stringify(dataList)
  })
}

export function treeResponse(asdis) {
  var asdid=[]
  asdid.push(asdis)
  return request({
    url: '/address/userAddress/getTreeIndex',
    method: 'post',
    contentType:"application/json",
    data:JSON.stringify(asdid)
  })
}
